home *** CD-ROM | disk | FTP | other *** search
- global mnew, mReadFile, mdispose
-
- on GetTextExtension
- return ".txt"
- end
-
- on GetArtExtension
- if the machineType = 256 then
- Extension = ".bmp"
- else
- Extension = ".pict"
- end if
- return Extension
- end
-
- on GetSavePathandName xName
- unLoad()
- FileioObj = new(xtra("fileio"))
- if not objectp(FileioObj) then
- beep()
- else
- pathAndName = displaySave(FileioObj, "Where would you like to save?", xName)
- FileioObj = 0
- return pathAndName
- end if
- end
-
- on EvalStripExtension pathAndName
- if the machineType = 256 then
- savedDelimiter = the itemDelimiter
- the itemDelimiter = "\"
- ItemCount = the number of items in pathAndName
- fileName = item ItemCount of pathAndName
- CharNum = offset(".", fileName)
- if CharNum > 0 then
- fileName = char 1 to CharNum - 1 of fileName
- end if
- put fileName into item ItemCount of pathAndName
- the itemDelimiter = savedDelimiter
- return pathAndName
- else
- return pathAndName
- end if
- end
-
- on IsKeyBoardEquivalentDown
- if the machineType = 256 then
- return the controlDown
- else
- return the commandDown
- end if
- end
-
- on readFile xFile
- FileioObj = fileio(mnew, "read", xFile)
- if objectp(FileioObj) then
- xText = FileioObj(mReadFile)
- FileioObj(mdispose)
- end if
- return xText
- end
-
- on GetTextFilePath
- if the machineType = 256 then
- xPath = the pathName & "textdata\"
- else
- xPath = the pathName & "textdata:"
- end if
- return xPath
- end
-